import json
from alg import Solution

def run_tests():
    with open('test_cases.json', 'r') as f:
        test_cases = json.load(f)
    
    for idx, test in enumerate(test_cases, 1):
        result = Solution.generate(test["numRows"])
        assert result == test["expected"], \
            f"Test case {idx} failed: input={test['numRows']}, output={result}, expected={test['expected']}"
        print(f"Test case {idx} passed!")

if __name__ == "__main__":
    run_tests()